/*package com.tool.subway;

import android.app.Application;
import android.content.Context;
import android.widget.Toast;

public class CDsubwayApplication extends Application
{

	private static CDsubwayApplication mInstance = null;
	public boolean m_bKeyRight = true;
//	BMapManager mBMapManager = null;

	public static final String strKey = "18A13C2807DF1A86497F10007AC8F22989970697";

	@Override
	public void onCreate()
	{
		super.onCreate();
		mInstance = this;
		initEngineManager(this);
	}

	@Override
	// 建议在您app的退出之前调用mapadpi的destroy()函数，避免重复初始化带来的时间消耗
	public void onTerminate()
	{
		// TODO Auto-generated method stub
		if (mBMapManager != null)
		{
			mBMapManager.destroy();
			mBMapManager = null;
		}
		super.onTerminate();
	}

	public void initEngineManager(Context context)
	{
		if (mBMapManager == null)
		{
			mBMapManager = new BMapManager(context);
		}

		if (!mBMapManager.init(strKey, new MyGeneralListener()))
		{
			Toast.makeText(
					CDsubwayApplication.getInstance().getApplicationContext(),
					"BMapManager  初始化错误!", Toast.LENGTH_LONG).show();
		}
	}

	public static CDsubwayApplication getInstance()
	{
		return mInstance;
	}

	// 常用事件监听，用来处理通常的网络错误，授权验证错误等
	static class MyGeneralListener implements MKGeneralListener
	{

		@Override
		public void onGetNetworkState(int iError)
		{
			if (iError == MKEvent.ERROR_NETWORK_CONNECT)
			{
				Toast.makeText(
						CDsubwayApplication.getInstance()
								.getApplicationContext(), "您的网络出错啦！请检查网络连接！！",
						Toast.LENGTH_LONG).show();
			}
			else if (iError == MKEvent.ERROR_NETWORK_DATA)
			{
				Toast.makeText(
						CDsubwayApplication.getInstance()
								.getApplicationContext(), "输入正确的检索条件！",
						Toast.LENGTH_LONG).show();
			}
			// ...
		}

		@Override
		public void onGetPermissionState(int iError)
		{
			if (iError == MKEvent.ERROR_PERMISSION_DENIED)
			{
				// 授权Key错误：
				Toast.makeText(
						CDsubwayApplication.getInstance()
								.getApplicationContext(),
						"Key有错，请核实！！",
						Toast.LENGTH_LONG).show();
				CDsubwayApplication.getInstance().m_bKeyRight = false;
			}
		}
	}
}*/